<% if adjustments.eligible.exists? %>
  <fieldset class="no-border-bottom">
    <legend><%= title %></legend>
    <table>
      <thead>
        <tr>
          <th><%= Spree::Adjustment.human_attribute_name(:name)%></th>
          <th><%= Spree::Adjustment.human_attribute_name(:amount)%></th>
        </tr>
      </thead>
      <tbody id="order-charges" data-hook="order_details_adjustments"  class="with-border">
        <% adjustments.eligible.group_by(&:label).each do |label, adjustments| %>
          <tr class="total">
            <td><strong><%= label %>:</strong></td>
            <td class="total align-center"><span><%= Spree::Money.new(adjustments.sum(&:amount), currency: adjustments.first.order.try(:currency)) %></span></td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </fieldset>
<% end %>
